package com.ibeetl.cms.entity;

import java.util.Date;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.beetl.sql.core.annotatoin.AutoID;
import org.beetl.sql.core.annotatoin.SeqID;

import com.ibeetl.admin.core.util.ValidateConfig;

import org.beetl.sql.core.TailBean;
import java.math.*;

import com.ibeetl.admin.core.annotation.Dict;
import com.ibeetl.admin.core.entity.BaseEntity;

import org.beetl.sql.core.annotatoin.InsertIgnore;
import org.beetl.sql.core.annotatoin.Version;
import org.beetl.sql.core.annotatoin.LogicDelete;


/* 
* 商品表
* gen by Spring Boot2 Admin 2019-10-10
*/
public class XxdItem extends BaseEntity{

    @NotNull(message = "ID不能为空", groups =ValidateConfig.UPDATE.class)
    @JsonSerialize(using= ToStringSerializer.class)
    /*@SeqID(name = ORACLE_CORE_SEQ_NAME)*/
    @AutoID
    /*@AssignID("uuid")*/
    private Long id ;
	
    //商品标题

    private String title ;
	
    //商品卖点

    private String sellPoint ;
	
    //商品价格，单位为：分

    private Long price ;
    private Long newPrice ;
    //库存数量

    private Integer num ;
	
    //商品条形码

    private String barcode ;
	
    //商品图片

    private String image ;
	
    //所属类目，叶子类目

    @Dict(type="item_cat")
    private Long cid ;
	
    //商品状态，1-正常，2-下架，3-删除

    @Dict(type="item_status")
    private Integer status ;
	
    //创建时间

    private Date created ;
	
    //更新时间

    private Date updated ;
	
    public XxdItem(){
    }

    /**商品id，同时也是商品编号
    *@return 
    */
    public Long getId(){
        return  id;
    }
    /**商品id，同时也是商品编号
    *@param  id
    */
    public void setId(Long id){
        this.id = id;
    }

    /**商品标题
    *@return 
    */
    public String getTitle(){
        return  title;
    }
    /**商品标题
    *@param  title
    */
    public void setTitle(String title){
        this.title = title;
    }

    /**商品卖点
    *@return 
    */
    public String getSellPoint(){
        return  sellPoint;
    }
    /**商品卖点
    *@param  sellPoint
    */
    public void setSellPoint(String sellPoint){
        this.sellPoint = sellPoint;
    }

    /**商品价格，单位为：分
    *@return 
    */
    public Long getPrice() {
        return  price;
    }
    /**商品价格，单位为：分
    *@param  price
    */
    public void setPrice(Long price){
        this.price = price;
    }

    /**库存数量
    *@return 
    */
    public Integer getNum(){
        return  num;
    }
    /**库存数量
    *@param  num
    */
    public void setNum(Integer num){
        this.num = num;
    }

    /**商品条形码
    *@return 
    */
    public String getBarcode(){
        return  barcode;
    }
    /**商品条形码
    *@param  barcode
    */
    public void setBarcode(String barcode){
        this.barcode = barcode;
    }

    /**商品图片
    *@return 
    */
    public String getImage(){
        return  image;
    }
    /**商品图片
    *@param  image
    */
    public void setImage(String image){
        this.image = image;
    }

    /**所属类目，叶子类目
    *@return 
    */
    public Long getCid(){
        return  cid;
    }
    /**所属类目，叶子类目
    *@param  cid
    */
    public void setCid(Long cid){
        this.cid = cid;
    }

    /**商品状态，1-正常，2-下架，3-删除
    *@return 
    */
    public Integer getStatus(){
        return  status;
    }
    /**商品状态，1-正常，2-下架，3-删除
    *@param  status
    */
    public void setStatus(Integer status){
        this.status = status;
    }

    /**创建时间
    *@return 
    */
    public Date getCreated(){
        return  created;
    }
    /**创建时间
    *@param  created
    */
    public void setCreated(Date created){
        this.created = created;
    }

    /**更新时间
    *@return 
    */
    public Date getUpdated(){
        return  updated;
    }
    /**更新时间
    *@param  updated
    */
    public void setUpdated(Date updated){
        this.updated = updated;
    }

    public Long getNewPrice() {
        return newPrice;
    }

    public void setNewPrice(Long newPrice) {
        this.newPrice = newPrice;
    }
}
